package me.firstapp.module.bbs;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

import me.firstapp.module.base.CommonEntity;

@MappedSuperclass
public class BaseNotification extends CommonEntity {

	private static final long serialVersionUID = 1L;

	// 通知是否已读,0是未读，1是已读
	@Column(name = "IS_READ", columnDefinition = "TINYINT DEFAULT 0", nullable = false)
	private Integer isRead;

	// 接收通知的用户
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TO_MEMBER_ID", nullable = false, referencedColumnName = "ID")
	private Member toMember;

	// 通知的内容
	@Column(name = "CONTENT", length = 225)
	private String content;

	// 通知时间
	@Column(name = "NOTIFY_TIME", nullable = false)
	private Date notifyTime;

	public Integer getIsRead() {
		return isRead;
	}

	public void setIsRead(Integer isRead) {
		this.isRead = isRead;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getNotifyTime() {
		return notifyTime;
	}

	public void setNotifyTime(Date notifyTime) {
		this.notifyTime = notifyTime;
	}

	public Member getToMember() {
		return toMember;
	}

	public void setToMember(Member toMember) {
		this.toMember = toMember;
	}

}
